use  "../data/zip_year_data", clear

*Define CHTV 
gen lnchtv = log((chinese100_cashval - american100_cashval/american100_val*chinese100_val)*(american100_val/(american100_val - american100_cashval)))



binscatter max_score lnchtv, ///
	graphregion(color(white)) bgcolor(white) ///
	ytitle(High School Rating) xtitle(Log CHTV) ///
	n(10) 
graph export "../results/figureA2a.png", replace

binscatter chi_restaurant lnchtv, ///
	graphregion(color(white)) bgcolor(white) ///
	ytitle(Number of Chinese Restaurants) xtitle(Log CHTV) ///
	n(10) 
graph export "../results/figureA2b.png", replace
